home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16291 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  24 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news.annex.com!bjg
  3. From: bjg@annex.com (Froman)
  4. Subject: Memory Loss Problem
  5. Message-ID: <497cc$111a32.23a@news.annex.com>
  6. Date: Wed, 10 Apr 1996 01:26:50 GMT
  7. Organization: The Annex! 140 Lines 818.779.5600
  8. X-Newsreader: TIN [version 1.2 PL2]
  9.  
  10. ...I'm working on a program using Borland C++ 3.0 that uses file 
  11. directory information, and created a class to store this.  Each item of 
  12. this class takes up 20 bytes of memory.  I have 2 nearly identical 
  13. routines using this class.  One reads the directory of the directory you 
  14. are in.  The other reads an ASCII file with the same info.  Both use a 
  15. container class (BI_ISVector, I beilieve...its a sorted array of 
  16. pointers).  Both work, BUT the one that reads the ASCII has a major 
  17. memory problem.  If I use the small memory model, it runs out of memory 
  18. after 19 entries.  On the large model (1MB memory, 64k max size of 
  19. array), it can read 155 entries.  I cannot seem to trace down the 
  20. problem...I cannot see where an error of 10-20x the amount of memory 
  21. needed could possibly take place.  Any ideas?
  22.  
  23.  
  24.